namespace IQIGame.Onigao.GamePlay
{

    public class DynParamProcessLedge : DynParamProcessBase
    {
        public DynParamProcessLedge(LevelPlayRegionController regionCtrl) : base(regionCtrl)
        {
        }

        public override EntityDynamicParamType paramType => EntityDynamicParamType.Ledge;

        public override bool isContainTriggerRect => true;


        public override void OnOneParamEffectiveAdded(BaseEntityDynamicParam paramValue, LevelPlayBaseEntity entity)
        {
            var ledgeData = paramValue as EntityParamLedgeData;
            MsgDispatcher.Broadcast<EntityParamLedgeData, LevelPlayBaseEntity>(MsgEventType.Level_AddJumpLedge, ledgeData, entity);
        }

        public override void OnOneParamEffectiveRemoved(BaseEntityDynamicParam paramValue, LevelPlayBaseEntity entity)
        {
            var ledgeData = paramValue as EntityParamLedgeData;
            MsgDispatcher.Broadcast<EntityParamLedgeData, LevelPlayBaseEntity>(MsgEventType.Level_RemoveJumpLedge, ledgeData, entity);
        }
    }

}